<?php

namespace common\models\credit_app_tables;

use Yii;

/**
 * This is the model class for table "{{%order_attachment}}".
 *
 * @property int $oa_id
 * @property int $oa_oid 订单号
 * @property string $oa_cert 证件照
 * @property string $oa_assets 资产照
 * @property string $oa_family 家访照
 * @property string $oa_sign 签字照
 * @property string $oa_video 视频
 * @property string $oa_flowing 流水照
 * @property string $oa_other 其他资料
 * @property string $oa_contract 合同照片
 * @property string $oa_status
 * @property int $oa_dateline
 * @property string $oa_singlecard 卡单照片
 */
class OrderAttachment extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%order_attachment}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_app');
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['oa_oid', 'oa_cert', 'oa_assets', 'oa_family', 'oa_sign', 'oa_video', 'oa_flowing', 'oa_other', 'oa_contract', 'oa_status', 'oa_dateline', 'oa_singlecard'], 'required'],
            [['oa_oid', 'oa_dateline'], 'integer'],
            [['oa_cert', 'oa_assets', 'oa_family', 'oa_sign', 'oa_video', 'oa_flowing', 'oa_other', 'oa_contract', 'oa_status', 'oa_singlecard'], 'string'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'oa_id' => Yii::t('app', 'Oa ID'),
            'oa_oid' => Yii::t('app', '订单号'),
            'oa_cert' => Yii::t('app', '证件照'),
            'oa_assets' => Yii::t('app', '资产照'),
            'oa_family' => Yii::t('app', '家访照'),
            'oa_sign' => Yii::t('app', '签字照'),
            'oa_video' => Yii::t('app', '视频'),
            'oa_flowing' => Yii::t('app', '流水照'),
            'oa_other' => Yii::t('app', '其他资料'),
            'oa_contract' => Yii::t('app', '合同照片'),
            'oa_status' => Yii::t('app', 'Oa Status'),
            'oa_dateline' => Yii::t('app', 'Oa Dateline'),
            'oa_singlecard' => Yii::t('app', '卡单照片'),
        ];
    }
}
